/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32l0xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
//tone
#define TONE_A2  110
#define TONE_AS2 117
#define TONE_B2  123
#define TONE_C3  131
#define TONE_CS3 139
#define TONE_D3  147
#define TONE_DS3 156
#define TONE_E3  165
#define TONE_F3  175
#define TONE_FS3 185
#define TONE_G3  196
#define TONE_GS3 208
#define TONE_A3  220
#define TONE_AS3 233
#define TONE_B3  247
#define TONE_C4  262
#define TONE_CS4 277
#define TONE_D4  294
#define TONE_DS4 311
#define TONE_E4  330
#define TONE_F4  349
#define TONE_FS4 370
#define TONE_G4  392
#define TONE_GS4 415
#define TONE_A4  440
#define TONE_AS4 466
#define TONE_B4  494
#define TONE_C5  523
#define TONE_CS5 554
#define TONE_D5  587
#define TONE_DS5 622
#define TONE_E5  659
#define TONE_F5  698
#define TONE_FS5 740
#define TONE_G5  784
#define TONE_GS5 831
#define TONE_A5  880
#define TONE_AS5 932
#define TONE_B5  988
#define TONE_C6  1047
#define TONE_CS6 1109
#define TONE_D6  1175
#define TONE_DS6 1245
#define TONE_E6  1319
/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define KeyUp_Pin GPIO_PIN_14
#define KeyUp_GPIO_Port GPIOC
#define KeyDown_Pin GPIO_PIN_15
#define KeyDown_GPIO_Port GPIOC
#define Key14_Pin GPIO_PIN_0
#define Key14_GPIO_Port GPIOA
#define Key17_Pin GPIO_PIN_1
#define Key17_GPIO_Port GPIOA
#define Key19_Pin GPIO_PIN_2
#define Key19_GPIO_Port GPIOA
#define Key12_Pin GPIO_PIN_3
#define Key12_GPIO_Port GPIOA
#define AD9833_FSYNC_Pin GPIO_PIN_4
#define AD9833_FSYNC_GPIO_Port GPIOA
#define Key10_Pin GPIO_PIN_6
#define Key10_GPIO_Port GPIOA
#define Key20_Pin GPIO_PIN_0
#define Key20_GPIO_Port GPIOB
#define Key18_Pin GPIO_PIN_1
#define Key18_GPIO_Port GPIOB
#define Key16_Pin GPIO_PIN_2
#define Key16_GPIO_Port GPIOB
#define Key15_Pin GPIO_PIN_8
#define Key15_GPIO_Port GPIOA
#define Key13_Pin GPIO_PIN_9
#define Key13_GPIO_Port GPIOA
#define Key11_Pin GPIO_PIN_10
#define Key11_GPIO_Port GPIOA
#define Key9_Pin GPIO_PIN_11
#define Key9_GPIO_Port GPIOA
#define Key8_Pin GPIO_PIN_12
#define Key8_GPIO_Port GPIOA
#define Key6_Pin GPIO_PIN_15
#define Key6_GPIO_Port GPIOA
#define Key4_Pin GPIO_PIN_3
#define Key4_GPIO_Port GPIOB
#define Key3_Pin GPIO_PIN_4
#define Key3_GPIO_Port GPIOB
#define Key1_Pin GPIO_PIN_5
#define Key1_GPIO_Port GPIOB
#define Key7_Pin GPIO_PIN_6
#define Key7_GPIO_Port GPIOB
#define Key5_Pin GPIO_PIN_7
#define Key5_GPIO_Port GPIOB
#define Key2_Pin GPIO_PIN_8
#define Key2_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
